// comment 评论
var mongoose = require('mongoose');

const commentSchema = new mongoose.Schema({
    order: [{//订单
        type: mongoose.Schema.Types.ObjectId,
        ref: "order"
    }],
    users: [{//评论用户
        type: mongoose.Schema.Types.ObjectId,
        ref: "users"
    }],
    outlet: [{//门店
        type: mongoose.Schema.Types.ObjectId,
        ref: "outlet"
    }],
    totalAmount: String,//总金额
    score: String,//评分
    contents: String,//评价内容
    img: [String],//评论图片
    review: String,//评论性质
});

mongoose.model("comment", commentSchema, "comment");